package com.qf.controller;

import com.qf.UserService;
import org.apache.dubbo.config.annotation.DubboReference;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author YDW
 * projectName:project2202_4
 * time:2022/7/10 16:45
 * description:
 */
@RestController
@RequestMapping("/user")
public class UserController {

    @DubboReference
    UserService userService;

    @RequestMapping("/login")
    public String login(String username,String password){

        boolean flag = userService.login(username, password);
        if (flag) {
            return "success";
        }
        return "error";

    }


}
